﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.Domain.BomManage
{
    /// <summary>
    /// BOM 明细（支持层级）
    /// </summary>
    [Table("BomItem")]
    public class BomItem : BaseEntity
    {
        /// <summary>
        /// 所属BOM Id
        /// </summary>
        public long BomId { get; set; }

        /// <summary>
        /// 所属BOM
        /// </summary>
         public string? BomName { get; set; }

        /// <summary>
        /// 父项Id（支持层级BOM）
        /// </summary>
        public long? ParentId { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public long MaterialId { get; set; }

        /// <summary>
        /// 物料名称（文本）
        /// </summary>
         public string? MaterialName { get; set; }

        /// <summary>
        /// 用量
        /// </summary>
        public decimal Qty { get; set; }
        
        /// <summary>
        /// 装配位置/顺序
        /// </summary>
        public int? Position { get; set; }

        
    }
}
